require'zdc.idutil'
local isparent=zdc.idutil.IsParent
module(..., package.seeall)

FallbackDb = {}
FallbackDb_mt = {__metatable = {}, __index = FallbackDb}

function new(params)
	local obj = {}
	setmetatable(obj, FallbackDb_mt)

	-- Establish the table used for node storage
	obj.store = {}
	return obj 
end

function FallbackDb:transdo(fn)
	return fn()
end

function FallbackDb:node_exist(id)
	return nil
end

function FallbackDb:get_node(id)
	return nil
end

function FallbackDb:save_node(id,data,ik,st)
	error('fallbackdb not support save['..id .. ']')
end

function FallbackDb:get_child_nodes(parentid)
	return {}
end

function FallbackDb:get_child_nodes_ex(parentid,where,sort,limit)
	return {},{}
end

function FallbackDb:get_nodes_by_prefix(prefix)
	return {}
end

function FallbackDb:get_nodes_by_prefix_ex(prefix)
	return {}
end

function FallbackDb:get_ids_by_prefix(prefix)
	return {}
end
function FallbackDb:get_ids_by_prefix_ex(prefix)
	return {},{}
end
function FallbackDb:del_node(id,deep)
	error('fallbackdb not support del['..id .. ']')
end

function FallbackDb:del_sub_nodes(parentid)
	error('fallbackdb not support delsub['..id .. ']')
end

function FallbackDb:get_label(id)
	error('fallbackdb not support get_label')
end

function FallbackDb:set_label(id, idx,sum,timestamp,usr)
	error('fallbackdb not support set_label')
end

function FallbackDb:get_nodes_sum(rootid, sumfun)
	return sumfun(nil,rootid,'')
end
